﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace Kaskelot.SP.UI.CONTROLTEMPLATES.Kaskelot.SP.UI.FormControls
{
    public partial class Mailadress : FormControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            iText.Name = iText.ClientID;
            iText.Attributes.Add("data-id", FaltData.Falt.Id.ToString());

            if (FaltData.Falt.Required)
                iText.Attributes["class"] += " required";

            if (!string.IsNullOrEmpty(FaltData.Data))
                iText.Value = FaltData.Data;
        }
    }
}
